const sha1=require('sha1');
const util=require('./util');
module.exports={
    checkSignature({query}){
        const token="***********";
        const {signature,timestamp,nonce,echostr}=query;
        let array=[token,timestamp,nonce];
        Array.prototype.sort.call(array);
        return sha1(array.join(""))===signature?echostr:"";
    },

    toWechart(){
        util.toWechart();
    }
}